
package biblio.service.msg.util.menu;


import java.util.HashMap;
import java.util.Map;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;


/**
 * Class is responsible for storing links for main menu.
 *
 * @author mephisto
 * 2011-08-23
 */
@ManagedBean(name="link")
@ApplicationScoped
public class LinkMenu
{
    public Map<String,String> getLinkMap()
    {
        return linkMap;
    }


    private static final String BASE_URL = "/Biblio/faces/";
    private static Map<String,String> linkMap;
    static
    {
        linkMap  = new HashMap<String,String>(20);
        linkMap.put("index", BASE_URL + "index.xhtml");

        linkMap.put("addBook", BASE_URL + "add_book.xhtml");
        linkMap.put("modifyBook", BASE_URL + "modify_book.xhtml");
        linkMap.put("hireBook", BASE_URL + "hire_book.xhtml");
        linkMap.put("giveBackBook", BASE_URL + "give_back_book.xhtml");

        linkMap.put("addCategory", BASE_URL + "add_category.xhtml");
        linkMap.put("modifyCategory", BASE_URL + "modify_category.xhtml");

        linkMap.put("addReader", BASE_URL + "add_reader.xhtml");
        linkMap.put("modifyReader", BASE_URL + "modify_reader.xhtml");

        linkMap.put("addAuthor", BASE_URL + "add_author.xhtml");
        linkMap.put("modifyAuthor", BASE_URL + "modify_author.xhtml");
    }
}
